package communal

import (
	_ "github.com/go-sql-driver/mysql"
	"github.com/go-xorm/xorm"
	"outsourced-projects/config"
)

func Sql() *xorm.Engine {
	engine, err := xorm.NewEngine("mysql", config.InitConfig().Mysql.MysqlStr)
	if err != nil {
		panic(err)
	}
	engine.ShowSQL(true)
	return engine
}
